﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Globalization;

namespace Common
{
    /// <summary>
    /// Extension methods for the DateTime object
    /// </summary>
    public static class DateUtil
    {
        /// <summary>
        /// Returns a string in the format "ddd, dd MMM yyyy HH:mm:ss zzz"
        /// </summary>
        /// <param name="time">The date to be formatted</param>
        /// <returns>A string in the format "ddd, dd MMM yyyy HH:mm:ss zzz"</returns>
        public static String ToLongDateTimeString(this DateTime time)
        { return time.ToString("ddd, dd MMM yyyy HH:mm:ss zzz", CultureInfo.InvariantCulture); }
    }
}
